﻿<UserControl
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	xmlns:myBoard_Framework_Controls="clr-namespace:myBoard.Framework.Controls;assembly=myBoard.Framework"
	x:Class="myTwitter.LoginScreen"
	x:Name="UserControl" Height="300">
	<UserControl.Resources>
		<Style x:Key="ButtonFocusVisual">
			<Setter Property="Control.Template">
				<Setter.Value>
					<ControlTemplate>
						<Rectangle Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" Margin="2" SnapsToDevicePixels="true"/>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<LinearGradientBrush x:Key="ButtonNormalBackground" EndPoint="0,1" StartPoint="0,0">
			<GradientStop Color="#F3F3F3" Offset="0"/>
			<GradientStop Color="#EBEBEB" Offset="0.5"/>
			<GradientStop Color="#DDDDDD" Offset="0.5"/>
			<GradientStop Color="#CDCDCD" Offset="1"/>
		</LinearGradientBrush>
		<SolidColorBrush x:Key="ButtonNormalBorder" Color="#FF707070"/>
		<Style x:Key="ButtonStyle1" TargetType="{x:Type Button}">
			<Setter Property="FocusVisualStyle" Value="{StaticResource ButtonFocusVisual}"/>
			<Setter Property="Background" Value="{StaticResource ButtonNormalBackground}"/>
			<Setter Property="BorderBrush" Value="{StaticResource ButtonNormalBorder}"/>
			<Setter Property="BorderThickness" Value="1"/>
			<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
			<Setter Property="HorizontalContentAlignment" Value="Center"/>
			<Setter Property="VerticalContentAlignment" Value="Center"/>
			<Setter Property="Padding" Value="1"/>
			<Setter Property="Template">
				<Setter.Value>
					<ControlTemplate TargetType="{x:Type Button}">
						<Border Margin="{TemplateBinding Padding}" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="1,1,1,1" CornerRadius="5,5,5,5" HorizontalAlignment="{TemplateBinding HorizontalAlignment}" VerticalAlignment="{TemplateBinding VerticalAlignment}">
							<Border Width="Auto" Height="Auto" BorderBrush="#FF2F566E" BorderThickness="1,1,1,1" CornerRadius="4,4,4,4">
								<Grid>
									<Grid.RowDefinitions>
										<RowDefinition Height="0.513*"/>
										<RowDefinition Height="0.487*"/>
									</Grid.RowDefinitions>
									<ContentPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" RecognizesAccessKey="True" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.RowSpan="2"/>
									<Rectangle Stroke="{x:Null}" Height="Auto" VerticalAlignment="Stretch" RadiusY="3.5" RadiusX="3.5">
										<Rectangle.Fill>
											<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
												<GradientStop Color="#34FFFFFF" Offset="0"/>
												<GradientStop Color="#19FFFFFF" Offset="1"/>
											</LinearGradientBrush>
										</Rectangle.Fill>
									</Rectangle>
								</Grid>
							</Border>
						</Border>
						<ControlTemplate.Triggers>
							<Trigger Property="IsEnabled" Value="false">
								<Setter Property="Foreground" Value="#ADADAD"/>
							</Trigger>
						</ControlTemplate.Triggers>
					</ControlTemplate>
				</Setter.Value>
			</Setter>
		</Style>
		<VisualBrush x:Key="SignInBrush" Visual="{Binding ElementName=_signInBt}"/>
		<Storyboard x:Key="OverSignIn">
			<ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_signInBt" Storyboard.TargetProperty="(FrameworkElement.Margin)">
				<SplineThicknessKeyFrame KeyTime="00:00:00.2000000" Value="0,10,0,0" KeySpline="0,1,1,1"/>
			</ThicknessAnimationUsingKeyFrames>
			<ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_signInReflection" Storyboard.TargetProperty="(FrameworkElement.Margin)">
				<SplineThicknessKeyFrame KeyTime="00:00:00.2000000" Value="0,28,0,0" KeySpline="0,1,1,1"/>
			</ThicknessAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="SignInLeave">
			<ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_signInBt" Storyboard.TargetProperty="(FrameworkElement.Margin)">
				<SplineThicknessKeyFrame KeyTime="00:00:00.3000000" Value="0,20,0,0" KeySpline="0,1,1,1"/>
			</ThicknessAnimationUsingKeyFrames>
			<ThicknessAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_signInReflection" Storyboard.TargetProperty="(FrameworkElement.Margin)">
				<SplineThicknessKeyFrame KeyTime="00:00:00.3000000" Value="0,13,0,0" KeySpline="0,1,1,1"/>
			</ThicknessAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="ShowAuthentBlock">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_authorizationBlock" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
				<SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.6000000" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_authorizationBlock" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
				<SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_loginBlock" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
				<SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.3000000" Value="-200"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_loginBlock" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_authorizationBlock" Storyboard.TargetProperty="(UIElement.Visibility)">
				<DiscreteObjectKeyFrame KeyTime="00:00:00.3000000" Value="{x:Static Visibility.Visible}"/>
				<DiscreteObjectKeyFrame KeyTime="00:00:00.6000000" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
				<SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse1" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
				<SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
		<Storyboard x:Key="ShowLogin">
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_authorizationBlock" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
				<SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.3000000" Value="-200"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_authorizationBlock" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.3000000" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_authorizationBlock" Storyboard.TargetProperty="(UIElement.Visibility)">
				<DiscreteObjectKeyFrame KeyTime="00:00:00.3000000" Value="{x:Static Visibility.Hidden}"/>
			</ObjectAnimationUsingKeyFrames>
			<ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_loginBlock" Storyboard.TargetProperty="(UIElement.Visibility)">
				<DiscreteObjectKeyFrame KeyTime="00:00:00.3000000" Value="{x:Static Visibility.Visible}"/>
			</ObjectAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_loginBlock" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
				<SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.6000000" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="_loginBlock" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)">
				<SplineDoubleKeyFrame KeySpline="0,1,1,1" KeyTime="00:00:00.6000000" Value="0"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
				<SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
			<DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse1" Storyboard.TargetProperty="(UIElement.Opacity)">
				<SplineDoubleKeyFrame KeyTime="00:00:00.3000000" Value="0"/>
				<SplineDoubleKeyFrame KeyTime="00:00:00.6000000" Value="1"/>
			</DoubleAnimationUsingKeyFrames>
		</Storyboard>
	</UserControl.Resources>
	<UserControl.Triggers>
		<EventTrigger RoutedEvent="Mouse.MouseEnter" SourceName="_signInBt">
			<BeginStoryboard Storyboard="{StaticResource OverSignIn}"/>
		</EventTrigger>
		<EventTrigger RoutedEvent="Mouse.MouseLeave" SourceName="_signInBt">
			<BeginStoryboard x:Name="SignInLeave_BeginStoryboard" Storyboard="{StaticResource SignInLeave}"/>
		</EventTrigger>
	</UserControl.Triggers>

	<Grid Margin="0,0,0,0" Width="298" Height="Auto">
		<Ellipse x:Name="ellipse1" Stroke="{x:Null}" HorizontalAlignment="Stretch" Margin="20,53,18,0" VerticalAlignment="Top" Width="Auto" Height="174" Opacity="0">
			<Ellipse.OpacityMask>
				<RadialGradientBrush>
					<GradientStop Color="#FF000000" Offset="0.19"/>
					<GradientStop Color="#00FFFFFF" Offset="1"/>
				</RadialGradientBrush>
			</Ellipse.OpacityMask>
			<Ellipse.Fill>
				<RadialGradientBrush>
					<GradientStop Color="#FF255272" Offset="0"/>
					<GradientStop Color="#FF274F6A" Offset="0.797"/>
					<GradientStop Color="#00255272" Offset="1"/>
				</RadialGradientBrush>
			</Ellipse.Fill>
		</Ellipse>
		<Ellipse x:Name="ellipse" Stroke="{x:Null}" HorizontalAlignment="Center" Margin="0,183.363,0,0" VerticalAlignment="Top" Width="300" Height="29" Opacity="0">
			<Ellipse.Fill>
				<RadialGradientBrush>
					<GradientStop Color="#FF000000" Offset="0"/>
					<GradientStop Color="#FF000000" Offset="0.612"/>
					<GradientStop Color="#00000000" Offset="1"/>
				</RadialGradientBrush>
			</Ellipse.Fill>
			<Ellipse.OpacityMask>
				<RadialGradientBrush>
					<GradientStop Color="#7F000000" Offset="0"/>
					<GradientStop Color="#00FFFFFF" Offset="1"/>
				</RadialGradientBrush>
			</Ellipse.OpacityMask>
		</Ellipse>
		<StackPanel x:Name="_loginBlock" Margin="0,60,0,0" VerticalAlignment="Top" Width="170" Height="Auto" Visibility="Hidden" RenderTransformOrigin="0.5,0.5">
			<StackPanel.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform Y="-200"/>
				</TransformGroup>
			</StackPanel.RenderTransform>
			<StackPanel>
				<TextBlock Foreground="#FFFFFFFF" Text="User name or e-mail adress :" TextWrapping="Wrap" FontSize="10"/>
				<TextBox x:Name="_loginTbx" HorizontalAlignment="Stretch" Margin="0,2,0,0" VerticalAlignment="Center" Width="Auto" Text="" TextWrapping="Wrap" Foreground="#FF6E6E6E" FontSize="10" BorderBrush="#FF000000">
					<TextBox.Background>
						<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
							<GradientStop Color="#FF666666" Offset="0"/>
							<GradientStop Color="#FFFFFFFF" Offset="0.205"/>
						</LinearGradientBrush>
					</TextBox.Background>
				</TextBox>
			</StackPanel>
			<StackPanel Margin="0,10,0,0">
				<TextBlock Foreground="#FFFFFFFF" Text="Password :" TextWrapping="Wrap" FontSize="10"/>
				<PasswordBox x:Name="_passwordTbx" HorizontalAlignment="Stretch" VerticalAlignment="Center" Width="Auto" Password="" Margin="0,2,0,0" Foreground="#FF6E6E6E" FontSize="10" BorderBrush="#FF000000">
					<PasswordBox.Background>
						<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
							<GradientStop Color="#FF666666" Offset="0"/>
							<GradientStop Color="#FFFFFFFF" Offset="0.205"/>
						</LinearGradientBrush>
					</PasswordBox.Background>
				</PasswordBox>
			</StackPanel>
			<Button x:Name="_signInBt" Margin="0,20,0,0" Style="{DynamicResource ButtonStyle1}" Width="Auto" Height="35" BorderBrush="#FF16364C" FontSize="16" Foreground="#FFFFFFFF" Padding="0,0,0,0" Cursor="Hand">
				<Button.Background>
					<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
						<GradientStop Color="#FF132F44" Offset="0.616"/>
						<GradientStop Color="#FF214358" Offset="1"/>
					</LinearGradientBrush>
				</Button.Background>
				<StackPanel HorizontalAlignment="Right" Width="Auto" Height="Auto" Orientation="Horizontal">
					<TextBlock FontSize="16" Foreground="#FFFFFFFF" Text="Sign in on Twitter" TextWrapping="Wrap" Margin="0,0,9,0"/>
					<Image Height="20" OpacityMask="{x:Null}" RenderTransformOrigin="0.5,0.5" Source="lockoverlay.png" Stretch="Fill" Width="Auto">
						<Image.RenderTransform>
							<TransformGroup>
								<ScaleTransform ScaleX="1" ScaleY="1"/>
								<SkewTransform AngleX="0" AngleY="0"/>
								<RotateTransform Angle="0.153"/>
								<TranslateTransform X="0" Y="0"/>
							</TransformGroup>
						</Image.RenderTransform>
					</Image>
				</StackPanel>
			</Button>
			<Rectangle x:Name="_signInReflection" Stroke="{x:Null}" Margin="0,13,0,0" Height="35" RenderTransformOrigin="0.5,0.5">
				<Rectangle.Fill>
					<VisualBrush Visual="{Binding ElementName=_signInBt}"/>
				</Rectangle.Fill>
				<Rectangle.OpacityMask>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#00000000" Offset="0.302"/>
						<GradientStop Color="#33FFFFFF" Offset="1"/>
					</LinearGradientBrush>
				</Rectangle.OpacityMask>
				<Rectangle.RenderTransform>
					<TransformGroup>
						<ScaleTransform ScaleX="1" ScaleY="-1"/>
						<SkewTransform AngleX="0" AngleY="0"/>
						<RotateTransform Angle="0"/>
						<TranslateTransform X="0" Y="0"/>
					</TransformGroup>
				</Rectangle.RenderTransform>
			</Rectangle>
		</StackPanel>
		<StackPanel x:Name="_authorizationBlock" HorizontalAlignment="Center" VerticalAlignment="Top" Width="170" Margin="0,60,0,0" RenderTransformOrigin="0.5,0.5" Visibility="Hidden">
			<StackPanel.RenderTransform>
				<TransformGroup>
					<ScaleTransform/>
					<SkewTransform/>
					<RotateTransform/>
					<TranslateTransform Y="-200"/>
				</TransformGroup>
			</StackPanel.RenderTransform>
			<StackPanel>
				<Button x:Name="_getAuthorizationCodeBt" Content="Get authorization code" Style="{DynamicResource ButtonStyle1}" BorderBrush="#FF16364C" Foreground="White" Margin="0,5,0,0" Height="25" Cursor="Hand">
				<Button.Background>
					<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
						<GradientStop Color="#FF132F44" Offset="0.616"/>
						<GradientStop Color="#FF214358" Offset="1"/>
					</LinearGradientBrush>
				</Button.Background>
				</Button>
			</StackPanel>
			<StackPanel Margin="0,10,0,0">
				<TextBlock Foreground="#FFFFFFFF" Text="Authorization code :" TextWrapping="Wrap" FontSize="10"/>
				<TextBox x:Name="_authorizationCodeTbx" HorizontalAlignment="Stretch" Margin="0,2,0,0" VerticalAlignment="Center" Width="Auto" Text="" TextWrapping="Wrap" Foreground="#FF6E6E6E" FontSize="10" BorderBrush="#FF000000">
					<TextBox.Background>
						<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
							<GradientStop Color="#FF666666" Offset="0"/>
							<GradientStop Color="#FFFFFFFF" Offset="0.205"/>
						</LinearGradientBrush>
					</TextBox.Background>
				</TextBox>
				<Button x:Name="_authorizeBt" Content="Authorize" Style="{DynamicResource ButtonStyle1}" Margin="0,5,0,0" BorderBrush="#FF16364C" Foreground="White" Height="25" Cursor="Hand">
					<Button.Background>
						<LinearGradientBrush EndPoint="0,1" StartPoint="0,0">
							<GradientStop Color="#FF132F44" Offset="0.616"/>
							<GradientStop Color="#FF214358" Offset="1"/>
						</LinearGradientBrush>
					</Button.Background>
				</Button>
			</StackPanel>
		</StackPanel>
		<myBoard_Framework_Controls:PreLoader x:Name="_preLoader" VerticalAlignment="Top" RenderTransformOrigin="0.5,0.5" d:LayoutOverrides="Height" Margin="0,0,0,0" Foreground="{x:Null}" HorizontalAlignment="Center" RingBackground="#6E4699CA">
			<myBoard_Framework_Controls:PreLoader.RenderTransform>
				<TransformGroup>
					<ScaleTransform ScaleX="0.5" ScaleY="0.5"/>
					<SkewTransform AngleX="0" AngleY="0"/>
					<RotateTransform Angle="0"/>
					<TranslateTransform X="0" Y="0"/>
				</TransformGroup>
			</myBoard_Framework_Controls:PreLoader.RenderTransform>
		</myBoard_Framework_Controls:PreLoader>
	</Grid>
</UserControl>